/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.mldn.demo;

/**
 *
 * @author Administrator
 */
public class OverrideDemo01 {
    public static void main(String[] args) {
        new Student01().print();
    }
}

class Person01{
    public void print(){
        System.out.println("Person01 -> void print(){}");
    }
}

class Student01 extends Person01 {
    
    // 扩展类的访问权限不能低于基类的覆写方法
    @Override
    public void print(){
        super.print();
        System.out.println("Student01 -> void print(){}");
    }
}